package com.softstone.sng.client;

import com.jme3.network.Client;
import com.jme3.network.Message;
import com.jme3.network.MessageListener;
import com.softstone.sng.messages.PlayerMessage;

/**
 *
 * @author Tomav
 */
public class MsgListener implements MessageListener<Client>
{
  private Main app;
  
  public MsgListener(Main app)
  {
    this.app = app;
  }

  public void messageReceived(Client source, Message m)
  {
    if(m instanceof PlayerMessage)
    {
      app.playerChange((PlayerMessage)m);
    }
  }
  
}
